package com.letwal.cmcvnd.webview

import android.webkit.JavascriptInterface

class AppJavaScriptInterface(private val targetActivity: AppJavaScriptImplement) {

    /** 查询用户状态 */
    @JavascriptInterface
    fun queryUserState(msg:String) {
        targetActivity.queryUserState(msg)
    }

    /** 打开外部浏览器 */
    @JavascriptInterface
    fun openSysBrowser(msg:String) {
        targetActivity.openSysBrowser(msg)
    }

    /** 返回首页 */
    @JavascriptInterface
    fun toHomeActivity(msg:String) {
        targetActivity.toHomeActivity(msg)
    }
}